home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Just Call Me Internet
/
Just Call Me Internet.iso
/
prog
/
atari
/
c
/
du_lib
/
stdkey.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-07-10
|
1KB
|
48 lines
/*
DU_LIB v2
Gem Window Management & Dialog Library For Lattice C
½1994, by Craig Graham.
Based on the DU_LIBv1 Library for HiSoft Basic.
*/
/*
Standard Keyboard Shortcut Handler
*/
#include "DULIB.H"
/*
This uses the Application global layer keyboard handler to define some
of the standard keyboard shortcuts used by most modern GEM programs.
These work mostly by sending an AES message to ourself to get the desired
effect.
*/
void Set_standard_keyboard(void)
{
Set_key_callback(0x1615, &std_key_close_window);
Set_key_callback(0x1117, &std_key_cycle_window);
}
/* Close the top window */
short std_key_close_window(void)
{
short a;
wind_get(0,WF_TOP,&a,0,0,0);
if (windows[a].window_type!=wt_null)
I_send_message(a, WM_CLOSED);
return TRUE;
}
/* Send top window to the bottom */
short std_key_cycle_window(void)
{
short a;
wind_get(0,WF_TOP,&a,0,0,0);
if (windows[a].window_type!=wt_null)
I_send_message(a, WM_BOTTOMED);
return TRUE;
}